package com.qqt.csr.im.assembler;

import com.qqt.csr.im.entity.Account;
import com.qqt.csr.im.entity.Connection;
import com.qqt.csr.im.enums.OnlineEnum;

import java.util.Date;

/**
 * @Author: yang hao
 * @Date: 2024/10/16 10:13
 * @Description: 账户信息装配器
 **/
public class AccountAssembler {

    /**
     * 转换
     * @param accountUserId
     * @return {@link Account} 账户信息
     */
    public static Account convert(String accountUserId, String name, String headImg) {
        return Account.builder()
                .accountUserId(accountUserId)
                .type(OnlineEnum.DOWNLINE.getCode())
                .accountName(name)
                .headImg(headImg)
                .createTime(new Date())
                .updateTime(new Date())
                .build();
    }

}
